Imports Excel = Microsoft.Office.Interop.Excel
'Imports Office = Microsoft.Office.Core

Public Class RangeEvaluator

    Public Shared Sub SetValue(ByRef range As Excel.Range, ByRef value As Object)
        Dim type As System.Type = value.GetType
        If (type Is GetType(Date)) Then
            range.FormulaR1C1 = value
            range.NumberFormat = "m/d/yyyy"
        Else
            range.Value = value
        End If
    End Sub

End Class
